<!DOCTYPE HTML><html>
<head>
<? echo $h->meta($title, $kwd, $dpn); ?>
<? require_once("lib.php"); ?>
<script src="<?=$ecom?>/js/jquery.validate.js" type="text/javascript"></script>
<script src="<?=$ecom?>/js/jquery.metadata.js" type="text/javascript"></script>
</head>
<body id="">
<? include_once("header.php"); ?>
<div id="wrap">
	<div class="breadcrumb">
		<a href="./"><?=WEB_INDEX_PAGE?></a> &gt; <a href="member.html"><?=WEB_MEMBER_CENTER?></a> &gt; <span><?=$cate_name?></span>
	</div><!--breadcrumb end-->
	<div id="" class="w180 left">
		<? require 'member_menu.php' ?>
	</div><!--. w220-->
		<div id="" class="right w760">
			<div class="">
				<div class="h2news">
					<h2><?=$cate_name?></h2>
				</div>
				<div class="content">
					<div class="">
					<form method="post" class="need_check">
						<? 
						// 签名以过滤非法提交表单
						$key=md5('ecomgear'.date('Ymd'));
						echo $h->hidden('key',$key);
						echo $h->hidden('action','repwd'); ?>
						<div class="px20"></div>
						<table class="table_profile" width="100%">
							<tr><td class="tright" width="140"><span class="error">*</span> <?=WEB_CURRENT_PASSWORD?>: </td><td>
								<input type="password" name="oldpwd" class="g" maxlength="20" value="" />
								</td></tr>
							<tr><td class="tright"><span class="error">*</span> <?=WEB_NEW_PASSWORD?>: </td><td>
								<input type="password" id="password" name="password" value="" class="g {validate:{required:true,minlength:6,messages:{required:'<?=WEB_NEW_PASSWORD_REQUIRED?>',minlength:'<? printf(WEB_PASSWORD_MIN_LENGTH,6)?>'}}}" maxlength="20" />
								</td></tr>
							<tr><td class="tright"><span class="error">*</span> <?=WEB_CONFIRM_PASSWORD?>: </td><td><input value="" class="g {validate:{required:true, equalTo:'#password', messages:{required:'<?=WEB_CONFIRM_PASSWORD_REQUIRED?>',equalTo:'<?=WEB_NEW_PASSWORD_AND_CONFIRM_PASSWORD_MISMATCH?>'}}}" type="password" name="mobile" name="repassword" maxlength="20" /></td></tr>
							<tr><td>&nbsp;</td><td class=""><input type="submit" class="button_blue" value="<?=WEB_SAVE?>" /></td></tr>
						</table>
						<div class="px20"></div>
					</form>
					</div>
				</div>
				<div class="map"></div>
				<div class="clear"></div>
			</div><!--. featured product-->
	</div><!--# featured_and_ad_right-->
		<div class="clear"></div>
	<div class="px20"></div>
	<div class="clear"></div>
</div>
<? include("footer.php"); ?>
<script type="text/javascript">
  $(document).ready(function(){

  	jQuery.validator.addMethod("old_password", function(value, element) {
	var flag = 0;
	$.ajax({
		type:"GET", url:'ajax_password.php', async:false,
		data:{'oldpwd':value},
		success: function(msg){ if(msg == '1'){ flag = 1; } }
	});
	if(flag == 0) return false; else return true;
	}, "");

  	$(".need_check").validate({meta: "validate",
  		rules:{
  			oldpwd:{required:true,old_password:true},
  		},
  		messages:{
  			oldpwd:{
  				required:'<?=WEB_OLD_PASSWORD_REQUIRED?>',
  			},
  		},
		onkeyup: false,
		errorPlacement: function( label, element ) {
			element.parent().append("<br>").append(label);
		}
  });
});
</script>
</body>
</html>